package com.ali.controller;

import com.ali.common.Response;
import com.ali.service.SeataService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/order")
public class OrderController {
    @Resource
    private SeataService seataService;

    /**
     * Seata事务
     */
    @PostMapping(value = "/seata")
    public Response<String> seata(@RequestBody Map<String, Object> param) {
        return seataService.seata(param);
    }
}